/**
 * @此文件管理微信小商店模块下的所有Api
 */
import request from "@/utils/request";

/** @description 小商店产品类别目录 */
export function productCategoryDirectory() {
  return request({
    url: "minishopProductCategory",
    method: "GET"
  });
}
/** @description 获取小商店产品列表 */
export function productList() {
  return request({
    url: "minishopSpu",
    method: "GET"
  });
}
/** @description 小商店产品详细信息 */
export function productInfo(id) {
  return request({
    url: `/minishopSpu/${id}`,
    method: "get"
  });
}
/** @description 产品运费模板 */
export function getFreightTemplate({ params }) {
  return request({
    url: "api/wechatopen/product/delivery/get_freight_template",
    method: "post",
    params
  });
}
export function createProduct({ params, data }) {
  return request({
    url: "/api/wechatopen/product/spu/add",
    method: "post",
    params,
    data
  });
}
